import { Link } from "expo-router";
import { Image } from "expo-image";
import { StyleProp, TextStyle, View, Text } from "react-native";

export default function ListLink({
  index,
  listText,
}: {
  index: number;
  listText: StyleProp<TextStyle>;
}) {
  return (
    <Link
      href={{
        pathname: "/info/[id]",
        params: { id: index },
      }}
      key={index}
    >
      <View
        style={{
          justifyContent: "center",
          alignItems: "center",
          height: 58,
          width: 58,
          backgroundColor: "#fff",
          borderRadius: 10,
          marginBottom: 10,
        }}
      >
        <Image
          source={require("@/assets/images/listIcon.png")}
          style={{ height: 30, width: 30 }}
        />
      </View>
      <Text style={listText}>List Santri</Text>
    </Link>
  );
}
